Commit dea60ad2 authored by wwccw0591's avatar wwccw0591

message

parent 1e5974db
......@@ -166,6 +166,14 @@ class MessageServiceModel extends \Business\AbstractModel
$toMember = $this->getUserByMemberIdAndSelfType($val['toId'], $val['toType']);
$val['message'] = unserialize($val['message']);
$val['toAvatar'] = $self['avatar'];
foreach($val['message']['buttons'] as &$button){
if($button['type']==ApiConst::messageButtonTypeConfirmButton || $button['type']==ApiConst::messageButtonTypeReciverButton){
$timeDiff=TIMESTAMP-$val['message']['createTime'];
if($timeDiff>(ApiConst::tenMinSecond-ApiConst::oneMinute)){
$button['showType']=ApiConst::messageButtonShowTypeGray;
}
}
}
$val['fromAvatar'] = $toMember['avatar'];
// $val['toAvatar']=$this->getAvatar($val['toType'],$val['toId']);
// $val['fromAvatar']=$this->getAvatar($val['fromType'],$val['fromId']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment